package com.example.test01;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 请修改注释
 *
 * @author zhangjianshe
 * @date 2022.10.13
 */
@Service
public class UserService {

    @Resource
    JdbcTemplate jdbcTemplate;

    @Resource
    UserService02 userService02;

    @Transactional
    public void transfer(){
        jdbcTemplate.update("update usertest set money = ? where username = ?;",1000,"zhangsan");
        userService02.update();
    }
}
